<head th:fragment="headerCss">
    <meta charset="utf-8">
    <title></title>
    <meta content="width=device-width, initial-scale=1.0" name="viewport">
    <meta name="keywords" content="2023年中职技能竞赛
聊城、德州、滨州、东营四市联赛
“婴幼儿保育”赛项">
    <meta name="description" content="2023年中职技能竞赛
聊城、德州、滨州、东营四市联赛
“婴幼儿保育”赛项">
    <link rel="stylesheet" href="/js/layui/css/layui.css">
    <!-- Bootstrap CSS File -->
    <link href="/lib/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="/js/layui/css/layui.css">
    <link rel="stylesheet" href="/css/examination/common.css">
    <link rel="shortcut icon" href="">
    <style>
        .a {
            color: black;
            text-align: center;
            font-weight: bold
        }

        .infoBox{width: 100%;background: linear-gradient(0deg, #E91F1F 0%, #ED3A35 100%);}
        .info{
            /*width: 95% !important;*/
            width: 100% !important;
            display: flex !important;
            /*background-color: #0082E5;*/
            /*margin: 20px 40px !important;*/
            justify-content: space-between;
            height: 80px;
        }
        .redlogo{width: 100%;height: 40px;float: left;margin-top: 12px;}
        .redlogo img{width: 100%;vertical-align: middle;}
        .attributes{width:750px;float: right;display: flex; justify-content: space-between;}
        #ticketNumber,#idCard, #name{
            color: #fefefe;
            text-align: center;
            line-height: 64px;
            float: left;
            margin-bottom: 0;
            font-size:20px}
        .btn-block{color:#fff;height:64px;width: 80px;padding: 0;font-size: 16px;background: transparent;border: none;margin-right: 20px;}

        .window_box{
            width: 80%;
            height: calc(100% - 120px);
            /* border: 1px solid #000; */
            background-color: #FFFFFF;
            color: #000;
            display: flex;
            flex-direction: row;
            justify-content: center;
            position: absolute;
            top: 0px;
            left: 10%;
            margin: 100px auto 0;
        }
        .resetCss{
            box-shadow: 0px 6px 16px 2px rgba(0,60,80,0.15),0 -2px 3px 0 rgba(0,60,80,0.15);border-radius: 4px;}
        .words{
            text-align: center;}
        .words img{width: 200px;height: 200px;display: block;margin: 0 auto}
        .words .tips{font-size: 25px;font-weight: 500;color: #333333;margin-top: 32px;}
        .infoBox {
            background: none !important;
        }
        .signin {
            /*background: url("../../../img/indexlogin.png") no-repeat;*/
            background-size: 100% 100%;
        }
        #examinationLogoImg{
            display: none;
        }
        #examinationLogoImg[src]{
            display: block;
        }
        #refresh{
            color: #FFFFFF;
            margin-left: 10px;
            font-size: 20px;
            display: flex;
            align-items: center;
        }
        #refresh:hover{
            cursor: pointer;
        }
        #myEndExamLog{
            visibility: hidden;
        }
        #myEndExamLog[src]{
            visibility: visible;
        }
    </style>
</head>
<body id="excessiveImage" class="signin">

<div class="infoBox">
    <div class="info">
        <div style="    width: 25%;    display: flex;  align-items: center; justify-content: center;">
            <img id="examinationLogoImg"  style="width: 25%;height: 86px;object-fit: contain;" >

        </div>
        <div style="    width: 35%;    display: flex;  align-items: center; justify-content: center;">
            <h1 id="roomNumber"></h1>
            <h1 id="seatNumber"></h1>
            <h1 id="name"></h1>
            <div id="refresh" style="display: none">
                <img src="/img/组 124.png" style="margin-right: 4px">
                刷新
            </div>
        </div>
    </div>
</div>
<div class="main_content">
    <div class="window_box resetCss">
        <div class="words">
            <img id="myEndExamLog" style="width: 300px; height: 300px; margin-top: 50px;">
            <p class="tips" style="font-size: 50px">您已成功提交</p>
            <div th:if="${!isTogether}">
                <p class="tips" style="font-size: 30px; color: #3177FF;">请等待婴幼儿早期发展教育分析考试!</p>
                <div class="optimize" style="margin-top: 50px;">
                    <div class="btnColor" onclick="login();">
                        <input class="btn btn-block not-allowed" id="sub"  readonly   value="开始考试"/>

                        <i class="layui-icon layui-icon-right" style="    color: #fff; position: relative; left: -50px; top: 17px;"></i>
                    </div>
                </div>
            </div>
        </div>

    </div>
</div>


<script type="text/javascript" src="/js/webJs/defaultConfig/style.config.js"></script>
<!-- 全局js -->
<script src="/js/jquery.min.js?v=2.1.4" th:src="@{/js/jquery.min.js?v=2.1.4}"></script>
<script src="/js/plugins/layer/layer.min.js" th:src="@{/js/plugins/layer/layer.min.js}"></script>
<script>
    $("#refresh").click(()=>{
        location.reload();
    })
    // f5、f12、f11禁用
    document.oncontextmenu=new Function("event.returnValue=false");
    document.onselectstart=new Function("event.returnValue=false");

    //f12、f11禁用
    // document.onkeydown = function (e) {
    //     var ev = window.event || e;
    //     var code = ev.keyCode || ev.which;
    //     if (123 || 122 ||  115) {
    //         if(ev.preventDefault) {
    //             ev.preventDefault();
    //         } else {
    //             ev.keyCode = 0;
    //             ev.returnValue = false;
    //         }
    //     }
    // };

    document.addEventListener("keydown", function(event) {
        // 检查按下的键是否为 F11 或 F12
        if (event.key === "F11" || event.key === "F12") {
            event.preventDefault();  // 阻止默认行为
        }
    });
    document.addEventListener("mousedown", function(event) {
        if(event.button === 1) { // 检测鼠标中键
            event.preventDefault(); // 阻止默认行为
        }
    });
    window.addEventListener('beforeunload',function(event){
        let e = event || window.event;
        e.preventDefault();
        if( e ){
            e.returnValue = '';
            return false;
        }
    })

    $().ready(function() {
        cteated(101)
        cteated(102)
        cteated(204)
        cteated(206)
        cteated(303)
        cteated(205)
        cteated(403)
    });
    $(function () {
        if(window.localStorage){
            var times =JSON.parse(window.localStorage.getItem("times"));
            $('#times').text(times);
            var times1 = times * 60;
            var intro = JSON.parse(window.localStorage.getItem("intro"));
            var info = JSON.parse(window.localStorage.getItem("info"));
            $("#startTime").html(intro.startTime);
            //监督员设置了延时
            if(info.endDate !=undefined){
                $("#endTime").html(info.endDate);
            }else{
                $("#endTime").html(intro.endTime);
            }

            $("#examNotes").html(intro.examNotes);
            $("#name").html("二次加密序号："+info.num2);
        }else{
            layer.msg("请换浏览器，最佳为谷歌")
        }
        $("#backGroundImage").text(window.localStorage.getItem("backGroundImage"))
    });
    $(function(){
        $("#resume").click(function(){
            layer.use('extend/layer.ext.js', function () {
                layer.prompt({title: '请输入手机号码'}, function(phone, index){
                    $('.layui-layer-input').attr('type','number')
                    var mobile = $('.layui-layer-input').val()
                    if(!(/^1[3|4|5|6|7|8|9][0-9]\d{8}$/.test(mobile))){
                        layer.msg('手机号码填写错误，请填写正确的手机格式');
                    }
                    layer.close(index);
                    var name = $('#name').val()
                    var ticketNumber = $('#ticketNumber').val()
                    var idNumber = $('#idNumber').val()

                    $.ajax({
                        url: "/jzApi/examinations/userPapers",
                        type: 'GET',
                        data: {
                            name:name,
                            ticketNumber: ticketNumber,
                            idNumber: idNumber,
                            phone: phone
                        },
                        success:function(res){
                            if(res.code == 0){
                                location.href='https://peixun.jz1x.com/cultivate/addResume'
                            }else{
                                return false
                            }
                        }
                    })
                });
            });

        })
    })

    function login() {
        $.ajax({
            url: "/jzApi/examinations/changeBatchState",
            type:'POST',
            data:{id:window.localStorage.getItem("cbatchId")},
            success: function (r) {
                console.log('r',r)
                if(r.code==0) {
                    $.ajax({
                        url: "/jzApi/examinations/changeState",
                        type:'POST',
                        data:{id:JSON.parse(window.localStorage.getItem("info")).stuSignId},
                        success: function (r) {
                            if(r)
                            {
                                location.href='/examination/exam?case=true';
                            }else{
                                location.href='/examination/login';
                                alert("未知错误，请重新登录！");
                            }
                        }
                    });
                }else if(r.code==1){
                    layer.confirm(r.msg, {
                        btn: ['确定'] //可以无限个按钮
                        ,btn1: function(index, layero){

                        }
                    });
                }else{
                    location.href='/examination/login';
                    alert("未知错误，请重新登录！");
                }
            }
        });
    }
</script>
</body>





